package org.study.springboot.learning.callback;

/**
 * <p>Title: 回调函数相关demo <p>
 * <p>Description: Teacher<p>
 *
 * @Author ZhangSY
 * @Date 2021/6/20 10:17
 * @Version v1.0
 **/
public class Teacher implements CallBackTest {
    private Student student;

    public Teacher(Student student) {
        this.student = student;
    }

    public void callStudent(CallBackTest callBackTest) {
        student.resolveQuestion(callBackTest);
    }

    @Override
    public void testAnswer(int answer) {
        System.out.println("Answer is " +answer);
    }
}
